﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Database.SetInitializer(new Dbinit());

            using(Admin db = new Admin())
            {
                db.Classes.ToList();

                var pro = db.Students.ToList();
                Console.WriteLine("{0}\t\t{1}\t\t{2}\t\t{3}\t", "姓名", "年龄", "性别", "创建时间");
                foreach (var item in pro)
                {
                    Console.WriteLine("{0}\t{1}\t\t{2}\t{3}\t",item.StudentName,item.Age,item.Sex,item.CreationTime);
                }
            }
        }
    }
}
